Skip to content

feat: Get AES IV from input (QoL)#2471

Open
andreasrtv wants to merge 1 commit into
gchq:masterfrom
andreasrtv:feature/aes-iv-from-input
Open

feat: Get AES IV from input (QoL)#2471
andreasrtv wants to merge 1 commit into
gchq:masterfrom
andreasrtv:feature/aes-iv-from-input

Conversation

@andreasrtv
Copy link
Copy Markdown

Description

Added an option to the "AES Decrypt" operation, to get the IV directly from the input. Prepending/appending the IV to the ciphertext is extremely common, and this makes the process of decrypting IV+CT or CT+IV a lot quicker and easier.

I am aware that this is already possible using registers + drop bytes, but due to how regularly this must be done, I felt that it deserved its own dedicated option.

The addition has minimal/no impact on the existing UI, with no changes to the default usage of the operation.

Screenshots

Current method

This is how one would get an appended IV using the current functionality. It is overly verbose, takes a bit of time to setup, and is also non-obvious unless you've explored CyberChef in-depth.

image

New method

This PR adds a new drop down. The previous example can now quickly be achieved:

image

More screenshots

Default AES Decrypt:

image

AES Decrypt with "IV from input" enabled:

image

AI disclosure

No AI was used.

Test Coverage

Existing tests were updated to account for the new args.

Added tests for:

  • Error when input length <= IV length
  • Input with IV prefix
  • Input with IV suffix
  • Input with IV prefix, GCM w/ AAD
  • Input with 12-byte (non-default) IV prefix, GCM w/ AAD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant